<div class="easyui-layout" data-options="fit:true">
    <form id="auditForm" method="post">
        <input type="hidden" name="id" id="auditId"/>
        <input type="hidden" name="rzqx" id="rzqx"/>
        <div data-options="region:'center'">
            <div>
                <table>
                    <div style="height: 20px"></div>
                    <tr>
                        <td width="90px">&nbsp;审核状态</td>
                        <td>&nbsp;&nbsp;&nbsp;<input style="width: auto" type="radio" name="auditStatus"
                                                     value="2">通过</input>
                            <input style="width: auto" type="radio" name="auditStatus" value="3">拒绝</input></td>
                    </tr>
                    <tr>
                        <td>&nbsp;审核意见</td>
                        <td>&nbsp;&nbsp;&nbsp;<input
                                style="width:250px ;height: 90px;padding-left: 0px;margin-left: 0px;" type="text"
                                name="suggestion"/></td>
                    </tr>
                    <tr>
                        <td>&nbsp;募集开始时间</td>
                        <td>&nbsp;&nbsp;&nbsp;<input class="easyui-datetimebox" name="mjStart"/></td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
    <div data-options="region:'south',border:false" style="text-align:right;padding:5px">
        <a class="easyui-linkbutton update" data-options="iconCls:'fa fa-save'" href="javascript:;"
           style="width:80px">提交</a>
        <a class="easyui-linkbutton" data-options="iconCls:'fa fa-close '" href="javascript:;"
           onclick="javascript:$('#reviewedwin').window('close')" style="width:80px">取消</a>
    </div>
</div>
<script type="text/javascript">
    //保存审核信息
    var edit = '/target/saveAudit';
    $(".update").click(function () {
        var auditStatus = $("input[name='auditStatus']:checked").val();
        var suggestion = $("input[name='suggestion']").val();
        if (suggestion == "") {
            $.messager.alert('操作提示', '请填写审核意见!', 'info');
            return;
        }
        if (auditStatus == '2') { //审核通过
            var mjStart = $("input[name='mjStart']").val();
            if (mjStart == "") {
                $.messager.alert('操作提示', '请选择募集时间 !', 'info');
                return;
            }
        }
        $.messager.progress();
        $('#auditForm').form('submit', {
            url: edit,
            success: function (data) {
                $.messager.progress('close');
                data = $.parseJSON(data);
                $.messager.show({
                    title: '操作结果',
                    msg: data.message,
                    timeout: 2000,
                    showType: 'slide'
                });
                if (data.state == "SUCCESS") {
                    //关闭窗口
                    $("#reviewedwin").window("close");
                    $('#list').datagrid('uncheckAll');
                    // 重新加载表格
                    $("#list").datagrid('load');
                }
            }
        });
    });

</script>